<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script  src="js/vue.js"></script>
    </head>
    <body>
        
        <div id="container">
               <template v-if="lgtype=='username'">
                   用户名:<input type="text" key="username"  placeholder="请输入用户名" />
                               <br>
               </template>

              <template v-else>
                    email:<input type="text" key="email"  placeholder="请输入邮箱" />
              </template>
            
        </div>
        <script>
          var app= new Vue({
               el:"#container",
               data:{
                   lgtype:"username",
                   username:"",
                   email:""
               }
           });
        </script>
     </body>
</html>
